package com.hnichr.emqx;


import org.eclipse.paho.client.mqttv3.MqttClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class MqttSubscribe {
    @Autowired
    private MqttClient client;

    @PostConstruct
    public void subscribe() throws Exception{
        client.subscribe("b956ba98-988cd83e/device/message/up/snapshot",0);
        client.subscribe("b956ba98-988cd83e/device/message/down/gpio_out/reply",0);
        client.subscribe("b956ba98-988cd83e/device/message/down/white_list_operator/reply",0);
        client.subscribe("b956ba98-988cd83e/device/message/down/get_io_status/reply",0);
    }
}
